/**
 * Created by Administrator on 2017/3/27 0027.
 */
Page1={
    Create:function(){
        var page={};

        var geometry=new THREE.PlaneGeometry(1136,740,1,1);
        var material=new THREE.MeshBasicMaterial({color:0x000000,transparent:true,side:THREE.DoubleSide});
        var plane=new THREE.Mesh(geometry,material);
        plane.material.opacity=0.1;

        // scene.add(plane);
        var geometry = new THREE.BoxGeometry( 11, 11, 11 );
        var material = new THREE.MeshBasicMaterial( {map:map, color: 0x00ff00 } );
        var box = new THREE.Mesh( geometry, material );

        // scene.add(box);


        var map;
        map=arr_texture[0];
        var picG=new THREE.PlaneGeometry(370*1,12*1,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic1=new THREE.Mesh(picG,picM);

        map=arr_texture[1];
        var picG=new THREE.PlaneGeometry(280*0.85,11*0.85,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic2=new THREE.Mesh(picG,picM);

        map=arr_texture[2];
        var picG=new THREE.PlaneGeometry(367*0.7,12*0.7,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic3=new THREE.Mesh(picG,picM);

        map=arr_texture[3];
        var picG=new THREE.PlaneGeometry(683*0.8,53*0.8,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic4=new THREE.Mesh(picG,picM);

        map=arr_texture[4];
        var picG=new THREE.PlaneGeometry(515*0.9,31*0.9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic5=new THREE.Mesh(picG,picM);

        map=arr_texture[5];
        var picG=new THREE.PlaneGeometry(50*0.9,17*0.9,1,1);
        var picM=new THREE.MeshBasicMaterial({map:map,transparent:true,side:THREE.DoubleSide});
        var pic6=new THREE.Mesh(picG,picM);

        console.log(tip_textrue);
        // map=tip_textrue;
        var picG=new THREE.PlaneGeometry(60,60,1,1);
        var picM=new THREE.MeshBasicMaterial({map:tip_textrue,transparent:true,side:THREE.DoubleSide});
        var pic7=new THREE.Mesh(picG,picM);

        pic1.position.set(0,105,0);
        pic2.position.set(0,65,125);
        pic3.position.set(0,30,250);
        pic4.position.set(0,0,300);
        pic5.position.set(20,-45,250);
        pic6.position.set(0,0-45,220);
        pic7.position.set(0,-120,220);

        pic1.material.opacity=0;
        pic2.material.opacity=0;
        pic3.material.opacity=0;
        pic4.material.opacity=0;
        pic5.material.opacity=0;
        pic6.material.opacity=0;
        pic7.material.opacity=0;

        pic4.scale.x=1.5; pic4.scale.y=1.5;
        pic5.scale.x=1.5; pic5.scale.y=1.5;
        pic6.scale.x=1.5; pic6.scale.y=1.5;



        scene.add(pic1);scene.add(pic2);scene.add(pic3);scene.add(pic4);scene.add(pic5);scene.add(pic6);scene.add(pic7);


        page.start=function() {
            pic1.position.y += 10;
            pic2.position.y += 10;
            pic3.position.y += 10;
            TweenMax.to(pic1.position, 0.7, {delay: 0, y: pic1.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic2.position, 0.7, {delay: 0.3, y: pic2.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic3.position, 0.7, {delay: 0.6, y: pic3.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic1.material, 0.7, {delay: 0, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 0.7, {delay: 0.3, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.7, {delay: 0.6, opacity: 1, ease: Cubic.easeOut});


            TweenMax.to(pic4.scale, 0.6, {delay: 0.9, x: 0.8, y: 0.8, ease: Cubic.easeOut});
            TweenMax.to(pic5.scale, 0.6, {delay: 1.2, x: 1, y: 1, ease: Cubic.easeOut});
            TweenMax.to(pic6.scale, 0.6, {delay: 1.5, x: 1, y: 1, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 0.6, {delay: 0.9, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic5.material, 0.6, {delay: 1.2, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic6.material, 0.6, {delay: 1.5, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.6, {delay: 1.8, opacity: 1, ease: Cubic.easeOut});
        }
        page.end=function() {
            TweenMax.to(pic1.material, 0.6, {delay: 0.2, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 0.6, {delay: 0.4, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.6, {delay: 0.6, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 0.6, {delay: 0.8, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic5.material, 0.6, {delay: 1, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic6.material, 0.6, {delay: 1.2, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.6, {delay: 1.4, opacity: 0, ease: Cubic.easeOut});
        }




        return page;
    }
}